import type { RouteRecordRaw } from 'vue-router'

function Layout() {
  return import('@/layouts/index.vue')
}

const routes: RouteRecordRaw = {
  path: '/string-deal',
  component: Layout,
  name: 'stringDealTool',
  meta: {
    title: '文本处理',
    icon: 'i-heroicons-solid:document-text',
  },
  children: [
    {
      path: '/string-deal/deduplicate',
      name: 'deduplicateToolIndex',
      component: () => import('@/views/DeduplicateTool.vue'),
      meta: {
        title: '文本去重',
        icon: 'i-heroicons-solid:document-arrow-down',
        menu: true,
        breadcrumb: false,
        activeMenu: '/string-deal/deduplicate',
      },
    },
    {
      path: '/string-deal/text-diff',
      name: 'textDiffToolIndex',
      component: () => import('@/views/TextDiffTool.vue'),
      meta: {
        title: '文本对比',
        icon: 'i-heroicons-solid:document-duplicate',
        menu: true,
        breadcrumb: false,
        activeMenu: '/string-deal/text-diff',
      },
    },
    {
      path: '/string-deal/base64-tool',
      name: 'base64ToolIndex',
      component: () => import('@/views/Base64Tool.vue'),
      meta: {
        title: 'Base64加解密',
        menu: true,
        breadcrumb: false,
        icon: 'i-mdi:code-braces',
        activeMenu: '/string-deal/base64-tool',
      },
    },
    {
      path: '/string-deal/jwt-tool',
      name: 'jwtToolIndex',
      component: () => import('@/views/JwtTool.vue'),
      meta: {
        title: 'JWT解析器',
        menu: true,
        breadcrumb: false,
        icon: 'i-mdi:key-chain-variant',
        activeMenu: '/string-deal/jwt-tool',
      },
    },
    {
      path: '/string-deal/base-conversion',
      name: 'baseConversionIndex',
      component: () => import('@/views/BaseConversionTool.vue'),
      meta: {
        title: '进制转换工具',
        menu: true,
        breadcrumb: false,
        icon: 'i-mdi:numeric',
        activeMenu: '/string-deal/base-conversion',
      },
    },
    {
      path: '/string-deal/json-parser',
      name: 'jsonParserIndex',
      component: () => import('@/views/JsonParserTool.vue'),
      meta: {
        title: 'JSON 解析工具',
        menu: true,
        breadcrumb: false,
        icon: 'i-carbon:json',
        activeMenu: '/string-deal/json-parser',
      },
    },
  ],
}

export default routes
